//
//  HMMineTableViewController.m
//  MeJieMian
//
//  Created by a on 16/9/10.
//  Copyright © 2016年 HM. All rights reserved.
//

#import "HMMineTableViewController.h"
#import "TextTableViewController.h"
#import "HMSettingViewController.h"
#import "HMHomeViewController.h"

@interface HMMineTableViewController ()<UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UILabel *socialSecurity;






@end

@implementation HMMineTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.tableView.contentInset = UIEdgeInsetsMake(-34, 0, 20, 0);
    self.tableView.bounces = NO;
    self.tableView.showsVerticalScrollIndicator = NO;
    
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:nil action:nil];
    
    self.navigationItem.backBarButtonItem = backItem;
    
    
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    if (indexPath.section == 0 && indexPath.row == 0) {
        UIStoryboard *sb = [UIStoryboard storyboardWithName:@"HMMineTableViewController" bundle:nil];
        TextTableViewController *textVC = [sb instantiateViewControllerWithIdentifier:@"textsb"];
        
        [self.navigationController pushViewController:textVC animated:YES];
    }
    
    if (indexPath.section == 3 && indexPath.row == 0) {
        
        HMSettingViewController *settingVC = [[HMSettingViewController alloc] init];
        
        [self.navigationController pushViewController:settingVC animated:YES];
    }
    
    if (indexPath.section == 4 && indexPath.row == 0) {
        
        HMHomeViewController *homeVC = [[HMHomeViewController alloc] init];
        [self.navigationController pushViewController:homeVC animated:YES];
    }
    
    
    
    
   
    
//    NSLog(@"%zd",indexPath.row);
    
    
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
    
}
@end
